const express = require('express');
const app = express();

const mw = function(req, res, next) {
    console.log('这是第一个消息中间件');
    next();
}

const mw1 = function(req, res, next) {
    console.log('这是第二个消息中间件');
    next();
}


app.get('/user', mw, mw1, (req, res) => {
    res.send('User Page');
})

app.get("/", [mw, mw1], (req, res) => {
    res.send('Home Page');
})

app.listen('80', function() {
    console.log('http://127.0.0.1');
})